home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / MPW_TOOL / TOOLS / TOOLS_WI / ICON_8 / MEMMON_F / MKCLR.ICN < prev    next >
Text File  |  1990-03-02  |  481b  |  17 lines

  1. # Icon program to preprocess color specification file into C macros
  2.  
  3. procedure main ()
  4.    ws := ' \t'
  5.    write ("/* created mechanically -- DO NOT EDIT */")
  6.    write ()
  7.    while line := read () do line ? {
  8.       tab (many (ws))
  9.       if ="#" | pos (0) then next    # skip comment line
  10.       label := tab (upto (ws)) | next
  11.       tab (many (ws))
  12.       if pos (0) then next
  13.       value := tab (upto (ws) | 0)
  14.       write ("ColorDefault(\"", label, "\",\"", value, "\")")
  15.       }
  16.    end
  17.